package com.ruoyi.common.exception;

public class StatusException extends RuntimeException {
    private int errCode;
    private String errMsg;

    //无参构造
    public StatusException() {
    }

    //错误描述和错误代码
    public StatusException(int errCode, String errMsg) {
        super(errMsg);
        this.errCode = errCode;
        this.errMsg = errMsg;
    }

    //错误描述和错误代码
    public StatusException(String errMsg) {
        super(errMsg);
        this.errCode = 1;
        this.errMsg = errMsg;
    }

    public int getErrCode() {
        return errCode;
    }

    public String getErrMsg() {
        return errMsg;
    }
}
